<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<style>
    .contain {
        height: 300px;
        width: 400px;
        display: flex;
        justify-content: space-between;
    }
    .img{
        height: 25px;
        width: 40px;
    }
    .contain-img{
        height: 300px;
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
    }
   
    .gray{
        background-color: gold;
    }

    .chinese{
        display: flex;
        align-items: center;
    }
</style>
<body>
  
    <div class="contain">
        
        <div class="contain-img">排名
            <img src="../one.jpg" alt=""  class="img">
            <img src="../two.jpg" alt="" class="img">
            <img src="../three.jpg" alt="" class="img">
        </div>

        

            <div class="item">姓名
                <div class="name" v-for='(item,index) in list' :class='{gray : index%2===0 }'> {{item.name}}</div>
            </div>
    
            <div  class="item">数学
                <div class="math" v-for='(item,index) in list' :class='{gray : index%2===0 }'>{{item.score[0].math}}</div>
            </div >
    
            <div  class="item">语文
                <div class="chinese" v-for='item in list'>{{item.score[0].chinese}}</div>
            </div>
    
            <div  class="item">英语
                <div class="english" v-for='item in list'>{{item.score[0].english}}</div>
            </div>
    
            <div  class="item">地理
                <div class="geography" v-for='item in list'>{{item.score[0].geography}}</div>
            </div>
    
            <div  class="item">历史
                <div class="history" v-for='item in list'>{{item.score[0].history}}</div>
            </div>
    
            <div  class="item">总分
                <div class="total" v-for='item in list'>{{item.score[0].math+item.score[0].chinese+item.score[0].english+item.score[0].geography + item.score[0].history}}</div>
            </div>

        

    </div>
</body>
<script>
    let vm =new Vue({
        el:'.contain',
        data:function(){
            return{
                list: [
      {
          name: '肖枫',

          score: [{

              math: 99, chinese: 100, english: 100, geography: 99, history: 98

          }]

      },

      {

          name: '安澜',

          score: [{

              math: 90, chinese: 98, english: 89, geography: 96, history: 100

          }]

      },

      {

          name: '路小北',

          score: [{

              math: 88, chinese: 87, english: 77, geography: 86, history: 78

          }]

      },

      {
          name: '许巍',
          score: [{
              math: 39, chinese: 40, english: 76, geography: 90, history: 59
          }]
      },

  ]
            }
         
        }
    })



</script>
</html>